<include file="public@header" />
<style>
.table img{
    width:50px;
}
</style>
</head>
<body>
	<div class="layui-fluid">
        <div class="layui-row">
            <div class="layui-page-content">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <form class="well form-inline margin-top-20">
                            课程名称：{$courseinfo['name']}
                            <br>
                            <br>
                            购买人数： {$nums}   <if condition="$courseinfo['paytype'] eq 1">&nbsp;&nbsp;&nbsp;&nbsp;总价格：{$total}</if>
                        </form>
                    </div>
                </div>
            </div>

            <div class="layui-page-content">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <form class="layui-form" method="post" action="{:url('Coursebuy/index')}">

                            <div class="layui-inline">
                                <label class="layui-form-label">注册时间</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input js-bootstrap-datetime" name="start_time"
                                           value="{:input('request.start_time')}"
                                           autocomplete="off" placeholder="开始日期">
                                </div>
                                -
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input js-bootstrap-datetime" name="end_time"
                                           value="{:input('request.end_time')}"
                                           autocomplete="off" placeholder="结束日期">
                                </div>
                            </div>


                            <div class="layui-inline">
                                <label class="layui-form-label">用户ID</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="uid" value="{:input('request.uid')}" placeholder="请输入{:lang('EMAIL')}">
                                </div>
                            </div>

                            <input type="hidden" name="courseid" value="{$courseinfo['id']}"/>

                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="submit" class="layui-btn btn-primary" value="搜索"/>
                                    <a class="layui-btn layui-btn-danger btn-danger" href="{:url('Coursebuy/index',['courseid'=>$courseinfo['id']])}">清空</a>
                                </div>
                            </div>

                        </form>
                    </div>
                </div>
            </div>

            <div class="layui-page-content">
                <div class="layui-card">
                    <form method="post" class="layui-card-body js-ajax-form" action="" method="post">
                        <table class="layui-table treeTable">
                            <thead>
                            <tr>
                                <th>用户</th>
                                <th>价格</th>
                                <if condition="$courseinfo['sort'] eq 1">
                                    <th>学习进度</th>
                                </if>
                                <th>时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <foreach name="list" item="vo">
                                <tr>
                                    <td>{$vo['userinfo']['user_nickname']} ({$vo['userinfo']['id']})</td>
                                    <td><if condition="$vo['money'] gt 0">{$vo['money']}</if></td>
                                    <if condition="$courseinfo['sort'] eq 1">
                                        <td>{$vo['lessons']}/{$courseinfo['lessons']}</td>
                                    </if>
                                    <td>{$vo['paytime']}</td>
                                </tr>
                            </foreach>
                            </tbody>
                        </table>

                    </form>
                </div>
            </div>
        </div>

	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>